;d3dx9.h d3dx9math.h d3dx9core.h d3dx9xof.h d3dx9mesh.h d3dx9shader.h d3dx9effect.h
;d3dx9tex.h d3dx9shape.h d3dx9anim.h"

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx9.h
;Content:    D3DX utility library

D3DX_DEFAULT = -1
D3DX_DEFAULT_NONPOW2 = -2
D3DX_DEFAULT_FLOAT = FLT_MAX
D3DX_FROM_FILE = -3
D3DFMT_FROM_FILE = -3

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx9math.h
;Content:    D3DX math types and functions
D3DX_PI equ 3.141592654
D3DX_1BYPI equ 0.318309886
D3DXToRadian equ 0.0174532925199433
D3DXToDegree equ 57.295779513082321

D3DX_16F_DIG equ 3.0
D3DX_16F_EPSILON equ 4.8875809e-4
D3DX_16F_MANT_DIG equ 11.0
D3DX_16F_MAX equ 6.550400e+004
D3DX_16F_MAX_10_EXP equ 4.0
D3DX_16F_MAX_EXP equ 15.0
D3DX_16F_MIN equ 6.1035156e-5
D3DX_16F_MIN_10_EXP equ -4.0
D3DX_16F_MIN_EXP equ -14.0
D3DX_16F_RADIX equ 2.0
D3DX_16F_ROUNDS equ 1.0

struct D3DXFLOAT16
       value dw ?
ends

struct D3DXVECTOR2
       x dd ?
       y dd ?
ends

struct D3DXVECTOR2_16F
       x D3DXFLOAT16
       y D3DXFLOAT16
ends

struct D3DXVECTOR3
       x dd ?
       y dd ?
       z dd ?
ends

struct D3DXVECTOR316F
       x D3DXFLOAT16
       y D3DXFLOAT16
       z D3DXFLOAT16
ends

struct D3DXVECTOR4
       x dd ?
       y dd ?
       z dd ?
       w dd ?
ends

struct D3DXVECTOR416F
       x D3DXFLOAT16
       y D3DXFLOAT16
       z D3DXFLOAT16
       w D3DXFLOAT16
ends

struct D3DXMATRIX
       _11 dd ?
       _12 dd ?
       _13 dd ?
       _14 dd ?
       _21 dd ?
       _22 dd ?
       _23 dd ?
       _24 dd ?
       _31 dd ?
       _32 dd ?
       _33 dd ?
       _34 dd ?
       _41 dd ?
       _42 dd ?
       _43 dd ?
       _44 dd ?
ends

struct D3DXQUATERNION
       x dd ?
       y dd ?
       z dd ?
       w dd ?
ends

struct D3DXPLANE
       a dd ?
       b dd ?
       c dd ?
       d dd ?
ends

struct D3DXCOLOR
       r dd ?
       g dd ?
       b dd ?
       a dd ?
ends

;IID_ID3DXMatrixStack GUID $c7885ba7,$f990,$4fe7,<$92,$2d,$85,$15,$e4,$77,$dd,$85>
interface ID3DXMatrixStack,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  Pop,\
	  Push,\
	  LoadIdentity,\
	  LoadMatrix,\
	  MultMatrix,\
	  MultMatrixLocal,\
	  RotateAxis,\
	  RotateAxisLocal,\
	  RotateYawPitchRoll,\
	  RotateYawPitchRollLocal,\
	  Scale,\
	  ScaleLocal,\
	  Translate,\
	  TranslateLocal,\
	  GetTop

D3DXSH_MINORDER = 2
D3DXSH_MAXORDER = 6

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx9core.h
;Content:    D3DX core types and functions

D3DX_VERSION = $902
D3DX_SDK_VERSION = 40

;IID_ID3DXBuffer GUID $8ba5fb08,$5195,$40e2,<$ac,$58,$d,$98,$9c,$3a,1,2>
interface ID3DXBuffer,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetBufferPointer,\
	  GetBufferSize

D3DXSPRITE_DONOTSAVESTATE = (1 shl 0)
D3DXSPRITE_DONOTMODIFY_RENDERSTATE = (1 shl 1)
D3DXSPRITE_OBJECTSPACE = (1 shl 2)
D3DXSPRITE_BILLBOARD = (1 shl 3)
D3DXSPRITE_ALPHABLEND = (1 shl 4)
D3DXSPRITE_SORT_TEXTURE = (1 shl 5)
D3DXSPRITE_SORT_DEPTH_FRONTTOBACK = (1 shl 6)
D3DXSPRITE_SORT_DEPTH_BACKTOFRONT = (1 shl 7)
D3DXSPRITE_DO_NOT_ADDREF_TEXTURE = (1 shl 8)

;IID_ID3DXSprite GUID $ba0b762d,$7d28,$43ec,<$b9,$dc,$2f,$84,$44,$3b,6,$14>
interface ID3DXSprite,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetDevice,\
	  GetTransform,\
	  SetTransform,\
	  SetWorldViewRH,\
	  SetWorldViewLH,\
	  Begin,\
	  Draw,\
	  Flush,\
	  End,\
	  OnLostDevice,\
	  OnResetDevice

struct D3DXFONTDESCA
       Height dd ?
       Width dd ?
       Weight dd ?
       MipLevels dd ?
       Italic dd ?
       CharSet db ?
       OutputPrecision db ?
       Quality db ?
       PitchAndFamily db ?
       FaceName db LF_FACESIZE dup(?)
ends

struct D3DXFONTDESCW
       Height dd ?
       Width dd ?
       Weight dd ?
       MipLevels dd ?
       Italic dd ?
       CharSet db ?
       OutputPrecision db ?
       Quality db ?
       PitchAndFamily db ?
       FaceName du LF_FACESIZE dup(?)
ends

;IID_ID3DXFont GUID $d79dbb70,$5f21,$4d36,$bb,$c2,$ff,$52,$5c,$21,$3c,$dc>
interface ID3DXFont,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetDevice,\
	  GetDescA,\
	  GetDescW,\
	  GetTextMetricsA,\
	  GetTextMetricsW,\
	  GetDC,\
	  GetGlyphData,\
	  PreloadCharacters,\
	  PreloadGlyphs,\
	  PreloadTextA,\
	  PreloadTextW,\
	  DrawTextA,\
	  DrawTextW,\
	  OnLostDevice,\
	  OnResetDevice

struct D3DXRTSDESC
       Width dd ?
       Height dd ?
       Format dd ?
       DepthStencil dd ?
       DepthStencilFormat dd ?
ends

;IID_ID3DXRenderToSurface GUID $6985f346,$2c3d,$43b3,<$be,$8b,$da,$ae,$8a,$3,$d8,$94>
interface ID3DXRenderToSurface,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetDevice,\
	  GetDesc,\
	  BeginScene,\
	  EndScene,\
	  OnLostDevice,\
	  OnResetDevice

struct D3DXRTEDESC
       Size dd ?
       MipLevels dd ?
       Format dd ?
       DepthStencil dd ?
       DepthStencilFormat dd ?
ends

;IID_ID3DXRenderToEnvMap GUID $313f1b4b,$c7b0,$4fa2,$9d,$9d,$8d,$38,$b,$64,$38,$5e>
interface ID3DXRenderToEnvMap,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetDevice,\
	  GetDesc,\
	  BeginCube,\
	  BeginSphere,\
	  BeginHemisphere,\
	  BeginParabolic,\
	  Face,\
	  End,\
	  OnLostDevice,\
	  OnResetDevice

;IID_ID3DXLine GUID $d379ba7f,$9042,$4ac4,$9f,$5e,$58,$19,$2a,$4c,$6b,$d8>
interface ID3DXLine,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetDevice,\
	  Begin,\
	  Draw,\
	  DrawTransform,\
	  SetPattern,\
	  SetPatternScale,\
	  SetWidth,\
	  SetAntialias,\
	  SetGLLines,\
	  End,\
	  OnLostDevice,\
	  OnResetDevice

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx9xof.h
;Content:    D3DX .X File types and functions
D3DXF_FILEFORMAT_BINARY = 0
D3DXF_FILEFORMAT_TEXT = 1
D3DXF_FILEFORMAT_COMPRESSED = 2

D3DXF_FILESAVE_TOFILE = 0
D3DXF_FILESAVE_TOWFILE = 1

D3DXF_FILELOAD_FROMFILE = 0
D3DXF_FILELOAD_FROMWFILE = 1
D3DXF_FILELOAD_FROMRESOURCE = 2
D3DXF_FILELOAD_FROMMEMORY = 3

struct D3DXFFILELOADRESOURCE
       hModule dd ?
       lpName dd ?
       lpType dd ?
ends

struct D3DXFFILELOADMEMORY
       lpMemory dd ?
       dSize dd ?
ends

;IID_ID3DXFile GUID $cef08cf9,$7b4f,$4429,<$96,$24,$2a,$69,$0a,$93,$32,$01>
;IID_ID3DXFileSaveObject GUID $cef08cfa,$7b4f,$4429,<$96,$24,$2a,$69,$0a,$93,$32,1>
;IID_ID3DXFileSaveData GUID $cef08cfb,$7b4f,$4429,<$96,$24,$2a,$69,$0a,$93,$32,1>
;IID_ID3DXFileEnumObject GUID $cef08cfc,$7b4f,$4429,<$96,$24,$2a,$69,$0a,$93,$32,1>
;IID_ID3DXFileData GUID $cef08cfd,$7b4f,$4429,<$96,$24,$2a,$69,$0a,$93,$32,1>

interface ID3DXFile,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  CreateEnumObject,\
	  CreateSaveObject,\
	  RegisterTemplates,\
	  RegisterEnumTemplates

interface ID3DXFileSaveObject,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetFile,\
	  AddDataObject,\
	  Save

interface ID3DXFileSaveData,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetSave,\
	  GetName,\
	  GetId,\
	  GetType,\
	  AddDataObject,\
	  AddDataReference

interface ID3DXFileEnumObject,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetFile,\
	  GetChildren,\
	  GetChild,\
	  GetDataObjectById,\
	  GetDataObjectByName

interface ID3DXFileData,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetEnum,\
	  GetName,\
	  GetId,\
	  Lock,\
	  Unlock,\
	  GetType,\
	  IsReference,\
	  GetChildren,\
	  GetChild

D3DXFERR_BADOBJECT = $88760384
D3DXFERR_BADVALUE = $88760385
D3DXFERR_BADTYPE = $88760386
D3DXFERR_NOTFOUND = $88760387
D3DXFERR_NOTDONEYET = $88760388
D3DXFERR_FILENOTFOUND = $88760389
D3DXFERR_RESOURCENOTFOUND = $8876038a
D3DXFERR_BADRESOURCE = $8876038b
D3DXFERR_BADFILETYPE = $8876038c
D3DXFERR_BADFILEVERSION = $8876038d
D3DXFERR_BADFILEFLOATSIZE = $8876038e
D3DXFERR_BADFILE = $8876038f
D3DXFERR_PARSEERROR = $88760390
D3DXFERR_BADARRAYSIZE = $88760391
D3DXFERR_BADDATAREFERENCE = $88760392
D3DXFERR_NOMOREOBJECTS = $88760393
D3DXFERR_NOMOREDATA = $88760394
D3DXFERR_BADCACHEFILE = $88760395


;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx9mesh.h
;Content:    D3DX mesh types and functions

;IID_ID3DXBaseMesh GUID $7ed943dd,$52e8,$40b5,<$a8,$d8,$76,$68,$5c,$40,$63,$30>
;IID_ID3DXMesh GUID $4020e5c2,$1403,$4929,<$88,$3f,$e2,$e8,$49,$fa,$c1,$95>
;IID_ID3DXPMesh GUID $8875769a,$d579,$4088,<$aa,$eb,$53,$4d,$1a,$d8,$4e,$96>
;IID_ID3DXSPMesh GUID $667ea4c7,$f1cd,$4386,<$b5,$23,$7c,$2,$90,$b8,$3c,$c5>
;IID_ID3DXSkinInfo GUID $11eaa540,$f9a6,$4d49,<$ae,$6a,$e1,$92,$21,$f7,$c,$c4>
;IID_ID3DXPatchMesh GUID $3ce6cc22,$dbf2,$44f4,<$89,$4d,$f9,$c3,$4a,$33,$71,$39>

D3DXPATCHMESH_RECT = 1
D3DXPATCHMESH_TRI = 2
D3DXPATCHMESH_NPATCH = 3

D3DXMESH_32BIT = 1
D3DXMESH_DONOTCLIP = 2
D3DXMESH_POINTS = 4
D3DXMESH_RTPATCHES = 8
D3DXMESH_NPATCHES = $4000
D3DXMESH_VB_SYSTEMMEM = $10
D3DXMESH_VB_MANAGED = $20
D3DXMESH_VB_WRITEONLY = $40
D3DXMESH_VB_DYNAMIC = $80
D3DXMESH_VB_SOFTWAREPROCESSING	= $8000
D3DXMESH_IB_SYSTEMMEM = $100
D3DXMESH_IB_MANAGED = $200
D3DXMESH_IB_WRITEONLY = $400
D3DXMESH_IB_DYNAMIC = $800
D3DXMESH_IB_SOFTWAREPROCESSING = $10000
D3DXMESH_VB_SHARE = $1000
D3DXMESH_USEHWONLY = $2000
D3DXMESH_SYSTEMMEM = $110
D3DXMESH_MANAGED = $220
D3DXMESH_WRITEONLY = $440
D3DXMESH_DYNAMIC = $880
D3DXMESH_SOFTWAREPROCESSING = $18000

D3DXPATCHMESH_DEFAULT = 0

D3DXMESHSIMP_VERTEX = 1
D3DXMESHSIMP_FACE = 2

D3DXCLEAN_BACKFACING = 1
D3DXCLEAN_BOWTIES = 2
D3DXCLEAN_SKINNING = D3DXCLEAN_BACKFACING
D3DXCLEAN_OPTIMIZATION = D3DXCLEAN_BACKFACING
D3DXCLEAN_SIMPLIFICATION= D3DXCLEAN_BACKFACING or D3DXCLEAN_BOWTIES

MAX_FVF_DECL_SIZE = MAXD3DDECLLENGTH + 1

D3DXTANGENT_WRAP_U = 1
D3DXTANGENT_WRAP_V = 2
D3DXTANGENT_WRAP_UV = 3
D3DXTANGENT_DONT_NORMALIZE_PARTIALS = 4
D3DXTANGENT_DONT_ORTHOGONALIZE = 8
D3DXTANGENT_ORTHOGONALIZE_FROM_V = $10
D3DXTANGENT_ORTHOGONALIZE_FROM_U = $20
D3DXTANGENT_WEIGHT_BY_AREA = $40
D3DXTANGENT_WEIGHT_EQUAL = $80
D3DXTANGENT_WIND_CW = $100
D3DXTANGENT_CALCULATE_NORMALS = $200
D3DXTANGENT_GENERATE_IN_PLACE = $400

D3DXIMT_WRAP_U = 1
D3DXIMT_WRAP_V = 2
D3DXIMT_WRAP_UV = 3

D3DXUVATLAS_DEFAULT = 0
D3DXUVATLAS_GEODESIC_FAST = 1
D3DXUVATLAS_GEODESIC_QUALITY = 2

struct D3DXATTRIBUTERANGE
       AttribId dd ?
       FaceStart dd ?
       FaceCount dd ?
       VertexStart dd ?
       VertexCount dd ?
ends


struct D3DXMATERIAL
       MatD3D D3DMATERIAL9
       dd ?
       pTextureFilename dq ?
ends

D3DXEDT_STRING = 1
D3DXEDT_FLOATS = 2
D3DXEDT_DWORD = 3

struct D3DXEFFECTDEFAULT
       pParamName dq ?
       Type dd ?
       NumBytes dd ?
       pValue dq ?
ends

struct D3DXEFFECTINSTANCE
       pEffectFilename dq ?
       NumDefaults dd ?,?
       pDefaults dq ?
ends

struct D3DXATTRIBUTEWEIGHTS
       Position dd ?
       Boundary dd ?
       Normal dd ?
       Diffuse dd ?
       Specular dd ?
       Texcoord dd 8 dup(?)
       Tangent dd ?
       Binormal dd ?
ends

D3DXWELDEPSILONS_WELDALL = 1
D3DXWELDEPSILONS_WELDPARTIALMATCHES = 2
D3DXWELDEPSILONS_DONOTREMOVEVERTICES = 4
D3DXWELDEPSILONS_DONOTSPLIT = 8

struct D3DXWELDEPSILONS
       Position dd ?
       BlendWeights dd ?
       Normal dd ?
       PSize dd ?
       Specular dd ?
       Diffuse dd ?
       Texcoord dd 8 dup(?)
       Tangent dd ?
       Binormal dd ?
       TessFactor dd ?
ends

interface ID3DXBaseMesh,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  DrawSubset,\
	  GetNumFaces,\
	  GetNumVertices,\
	  GetFVF,\
	  GetDeclaration,\
	  GetNumBytesPerVertex,\
	  GetOptions,\
	  GetDevice,\
	  CloneMeshFVF,\
	  CloneMesh,\
	  GetVertexBuffer,\
	  GetIndexBuffer,\
	  LockVertexBuffer,\
	  UnlockVertexBuffer,\
	  LockIndexBuffer,\
	  UnlockIndexBuffer,\
	  GetAttributeTable,\
	  ConvertPointRepsToAdjacency,\
	  ConvertAdjacencyToPointReps,\
	  GenerateAdjacency,\
	  UpdateSemantics

interface ID3DXMesh,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  DrawSubset,\
	  GetNumFaces,\
	  GetNumVertices,\
	  GetFVF,\
	  GetDeclaration,\
	  GetNumBytesPerVertex,\
	  GetOptions,\
	  GetDevice,\
	  CloneMeshFVF,\
	  CloneMesh,\
	  GetVertexBuffer,\
	  GetIndexBuffer,\
	  LockVertexBuffer,\
	  UnlockVertexBuffer,\
	  LockIndexBuffer,\
	  UnlockIndexBuffer,\
	  GetAttributeTable,\
	  ConvertPointRepsToAdjacency,\
	  ConvertAdjacencyToPointReps,\
	  GenerateAdjacency,\
	  UpdateSemantics,\
	  LockAttributeBuffer,\
	  UnlockAttributeBuffer,\
	  Optimize,\
	  OptimizeInplace,\
	  SetAttributeTable

interface ID3DXPMesh,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  DrawSubset,\
	  GetNumFaces,\
	  GetNumVertices,\
	  GetFVF,\
	  GetDeclaration,\
	  GetNumBytesPerVertex,\
	  GetOptions,\
	  GetDevice,\
	  CloneMeshFVF,\
	  CloneMesh,\
	  GetVertexBuffer,\
	  GetIndexBuffer,\
	  LockVertexBuffer,\
	  UnlockVertexBuffer,\
	  LockIndexBuffer,\
	  UnlockIndexBuffer,\
	  GetAttributeTable,\
	  ConvertPointRepsToAdjacency,\
	  ConvertAdjacencyToPointReps,\
	  GenerateAdjacency,\
	  UpdateSemantics,\
	  ClonePMeshFVF,\
	  ClonePMesh,\
	  SetNumFaces,\
	  SetNumVertices,\
	  GetMaxFaces,\
	  GetMinFaces,\
	  GetMaxVertices,\
	  GetMinVertices,\
	  Save,\
	  Optimize,\
	  OptimizeBaseLOD,\
	  TrimByFaces,\
	  TrimByVertices,\
	  GetAdjacency,\
	  GenerateVertexHistory

interface ID3DXSPMesh,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetNumFaces,\
	  GetNumVertices,\
	  GetFVF,\
	  GetDeclaration,\
	  GetOptions,\
	  GetDevice,\
	  CloneMeshFVF,\
	  CloneMesh,\
	  ClonePMeshFVF,\
	  ClonePMesh,\
	  ReduceFaces,\
	  ReduceVertices,\
	  GetMaxFaces,\
	  GetMaxVertices,\
	  GetVertexAttributeWeights,\
	  GetVertexWeights

UNUSED16 = $ffff
UNUSED32 = $ffffffff

D3DXMESHOPT_COMPACT = $1000000
D3DXMESHOPT_ATTRSORT = $2000000
D3DXMESHOPT_VERTEXCACHE = $4000000
D3DXMESHOPT_STRIPREORDER = $8000000
D3DXMESHOPT_IGNOREVERTS = $10000000
D3DXMESHOPT_DONOTSPLIT = $20000000
D3DXMESHOPT_DEVICEINDEPENDENT = $400000
;D3DXMESHOPT_SHAREVB has been removed, please use D3DXMESH_VB_SHARE instead

struct D3DXBONECOMBINATION
       AttribId dd ?
       FaceStart dd ?
       FaceCount dd ?
       VertexStart dd ?
       VertexCount dd ?,?
       BoneId dq ?
ends

struct D3DXPATCHINFO
       PatchType dd ?
       Degree dd ?
       Basis dd ?
ends

interface ID3DXPatchMesh,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetNumPatches,\
	  GetNumVertices,\
	  GetDeclaration,\
	  GetControlVerticesPerPatch,\
	  GetOptions,\
	  GetDevice,\
	  GetPatchInfo,\
	  GetVertexBuffer,\
	  GetIndexBuffer,\
	  LockVertexBuffer,\
	  UnlockVertexBuffer,\
	  LockIndexBuffer,\
	  UnlockIndexBuffer,\
	  LockAttributeBuffer,\
	  UnlockAttributeBuffer,\
	  GetTessSize,\
	  GenerateAdjacency,\
	  CloneMesh,\
	  Optimize,\
	  SetDisplaceParam,\
	  GetDisplaceParam,\
	  Tessellate,\
	  TessellateAdaptive

interface ID3DXSkinInfo,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  SetBoneInfluence,\
	  SetBoneVertexInfluence,\
	  GetNumBoneInfluences,\
	  GetBoneInfluence,\
	  GetBoneVertexInfluence,\
	  GetMaxVertexInfluences,\
	  GetNumBones,\
	  FindBoneVertexInfluenceIndex,\
	  GetMaxFaceInfluences,\
	  SetMinBoneInfluence,\
	  GetMinBoneInfluence,\
	  SetBoneName,\
	  GetBoneName,\
	  SetBoneOffsetMatrix,\
	  GetBoneOffsetMatrix,\
	  Clone,\
	  Remap,\
	  SetFVF,\
	  SetDeclaration,\
	  GetFVF,\
	  GetDeclaration,\
	  UpdateSkinnedMesh,\
	  ConvertToBlendedMesh,\
	  ConvertToIndexedBlendedMesh

struct D3DXINTERSECTINFO
       FaceIndex dd ?
       U dd ?
       V dd ?
       Dist dd ?
ends

D3DXSHCQUAL_FASTLOWQUALITY = 1
D3DXSHCQUAL_SLOWHIGHQUALITY = 2

D3DXSHGPUSIMOPT_SHADOWRES256 = 1
D3DXSHGPUSIMOPT_SHADOWRES512 = 0
D3DXSHGPUSIMOPT_SHADOWRES1024 = 2
D3DXSHGPUSIMOPT_SHADOWRES2048 = 3
D3DXSHGPUSIMOPT_HIGHQUALITY = 4

struct D3DXSHMATERIAL
       Diffuse D3DCOLORVALUE
       bMirror dd ?
       bSubSurf dd ?
       RelativeIndexOfRefraction dd ?
       Absorption D3DCOLORVALUE
       ReducedScattering D3DCOLORVALUE
ends

struct D3DXSHPRTSPLITMESHVERTDATA
       uVertRemap dd ?
       uSubCluster dd ?
       ucVertStatus db ?,?,?,?
ends

struct D3DXSHPRTSPLITMESHCLUSTERDATA
       uVertStart dd ?
       uVertLength dd ?
       uFaceStart dd ?
       uFaceLength dd ?
       uClusterStart dd ?
       uClusterLength dd ?
ends

;IID_ID3DXPRTBuffer GUID $f1827e47,$a8,$49cd,<$90,$8c,$9d,$11,$95,$5f,$87,$28>
;IID_ID3DXPRTCompBuffer GUID $a758d465,$fe8d,$45ad,<$9c,$f0,$d0,$1e,$56,$26,$6a,$7>
;IID_ID3DXTextureGutterHelper GUID $838f01ec,$9729,$4527,<$aa,$db,$df,$70,$ad,$e7,$fe,$a9>
;IID_ID3DXPRTEngine GUID $683a4278,$cd5f,$4d24,<$90,$ad,$c4,$e1,$b6,$85,$5d,$53>

interface ID3DXPRTBuffer,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetNumSamples,\
	  GetNumCoeffs,\
	  GetNumChannels,\
	  IsTexture,\
	  GetWidth,\
	  GetHeight,\
	  Resize,\
	  LockBuffer,\
	  UnlockBuffer,\
	  ScaleBuffer,\
	  AddBuffer,\
	  AttachGH,\
	  ReleaseGH,\
	  EvalGH,\
	  ExtractTexture,\
	  ExtractToMesh

interface ID3DXPRTCompBuffer,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetNumSamples,\
	  GetNumCoeffs,\
	  GetNumChannels,\
	  IsTexture,\
	  GetWidth,\
	  GetHeight,\
	  GetNumClusters,\
	  GetNumPCA,\
	  NormalizeData,\
	  ExtractBasis,\
	  ExtractClusterIDs,\
	  ExtractPCA,\
	  ExtractTexture,\
	  ExtractToMesh

interface ID3DXTextureGutterHelper,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetWidth,\
	  GetHeight,\
	  ApplyGuttersFloat,\
	  ApplyGuttersTex,\
	  ApplyGuttersPRT,\
	  ResampleTex,\
	  GetFaceMap,\
	  GetBaryMap,\
	  GetTexelMap,\
	  GetGutterMap,\
	  SetFaceMap,\
	  SetBaryMap,\
	  SetTexelMap,\
	  SetGutterMap

interface ID3DXPRTEngine,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  SetMeshMaterials,\
	  SetPerVertexAlbedo,\
	  SetPerTexelAlbedo,\
	  GetVertexAlbedo,\
	  SetPerTexelNormal,\
	  ExtractPerVertexAlbedo,\
	  ResampleBuffer,\
	  GetAdaptedMesh,\
	  GetNumVerts,\
	  GetNumFaces,\
	  SetMinMaxIntersection,\
	  RobustMeshRefine,\
	  SetSamplingInfo,\
	  ComputeDirectLightingSH,\
	  ComputeDirectLightingSHAdaptive,\
	  ComputeDirectLightingSHGPU,\
	  ComputeSS,\
	  ComputeSSAdaptive,\
	  ComputeBounce,\
	  ComputeBounceAdaptive,\
	  ComputeVolumeSamplesDirectSH,\
	  ComputeVolumeSamples,\
	  ComputeSurfSamplesDirectSH,\
	  ComputeSurfSamplesBounce,\
	  FreeSSData,\
	  FreeBounceData,\
	  ComputeLDPRTCoeffs,\
	  ScaleMeshChunk,\
	  MultiplyAlbedo,\
	  SetCallBack,\
	  ShadowRayIntersects,\
	  ClosestRayIntersects

;DXFILEOBJ_XSkinMeshHeader GUID $3cf169ce,$ff7c,$44ab,<$93,$c0,$f7,$8f,$62,$d1,$72,$e2>
;DXFILEOBJ_VertexDuplicationIndices GUID $b8d65549,$d7c9,$4995,<$89,$cf,$53,$a9,$a8,$b0,$31,$e3>
;DXFILEOBJ_FaceAdjacency GUID $a64c844a,$e282,$4756,<$8b,$80,$25,$c,$de,$4,$39,$8c>
;DXFILEOBJ_SkinWeights GUID $6f0d123b,$bad2,$4167,<$a0,$d0,$80,$22,$4f,$25,$fa,$bb>
;DXFILEOBJ_Patch GUID $a3eb5d44,$fc22,$429d,<$9a,$fb,$32,$21,$cb,$97,$19,$a6>
;DXFILEOBJ_PatchMesh GUID $d02c95cc,$edba,$4305,<$9b,$5d,$18,$20,$d7,$70,$4b,$bf>
;DXFILEOBJ_PatchMesh9 GUID $b9ec94e1,$b9a6,$4251,<$ba,$18,$94,$89,$3f,$2,$c0,$ea>
;DXFILEOBJ_PMInfo GUID $b6c3e656,$ec8b,$4b92,<$9b,$62,$68,$16,$59,$52,$29,$47>
;DXFILEOBJ_PMAttributeRange GUID $917e0427,$c61e,$4a14,<$9c,$64,$af,$e6,$5f,$9e,$98,$44>
;DXFILEOBJ_PMVSplitRecord GUID $574ccc14,$f0b3,$4333,<$82,$2d,$93,$e8,$a8,$a0,$8e,$4c>
;DXFILEOBJ_FVFData GUID $b6e70a0e,$8ef9,$4e83,<$94,$ad,$ec,$c8,$b0,$c0,$48,$97>
;DXFILEOBJ_VertexElement GUID $f752461c,$1e23,$48f6,<$b9,$f8,$83,$50,$85,$f,$33,$6f>
;DXFILEOBJ_DeclData GUID $bf22e553,$292c,$4781,<$9f,$ea,$62,$bd,$55,$4b,$dd,$93>
;DXFILEOBJ_EffectFloats GUID $f1cfe2b3,$de3,$4e28,<$af,$a1,$15,$5a,$75,$a,$28,$2d>
;DXFILEOBJ_EffectString GUID $d55b097e,$bdb6,$4c52,<$b0,$3d,$60,$51,$c8,$9d,$e,$42>
;DXFILEOBJ_EffectDWord GUID $622c0ed0,$956e,$4da9,<$90,$8a,$2a,$f9,$4f,$3c,$e7,$16>
;DXFILEOBJ_EffectParamFloats GUID $3014b9a0,$62f5,$478c,<$9b,$86,$e4,$ac,$9f,$4e,$41,$8b>
;DXFILEOBJ_EffectParamString GUID $1dbc4c88,$94c1,$46ee,<$90,$76,$2c,$28,$81,$8c,$94,$81>
;DXFILEOBJ_EffectParamDWord GUID $e13963bc,$ae51,$4c5d,<$b0,$f,$cf,$a3,$a9,$d9,$7c,$e5>
;DXFILEOBJ_EffectInstance GUID $e331f7e4,$559,$4cc2,<$8e,$99,$1c,$ec,$16,$57,$92,$8f>
;DXFILEOBJ_AnimTicksPerSecond GUID $9e415a43,$7ba6,$4a73,<$87,$43,$b7,$3d,$47,$e8,$84,$76>
;DXFILEOBJ_CompressedAnimationSet GUID $7f9b00b3,$f125,$4890,<$87,$6e,$1c,$42,$bf,$69,$7c,$4d>

struct XFILECOMPRESSEDANIMATIONSET
       CompressedBlockSize dd ?
       TicksPerSec dd ?
       PlaybackType dd ?
       BufferLength dd ?
ends

;Copyright (c) Microsoft Corporation.  All rights reserved.
;File:       d3dx9shader.h
;Content:    D3DX Shader APIs
macro D3DXTX_VERSION  _Major, _Minor {
      VALUE = ('T' shl 24) or ('X' shl 16) or (_Major shl 8) or _Minor
}

D3DXSHADER_DEBUG = (1 shl 0)
D3DXSHADER_SKIPVALIDATION = (1 shl 1)
D3DXSHADER_SKIPOPTIMIZATION = (1 shl 2)
D3DXSHADER_PACKMATRIX_ROWMAJOR = (1 shl 3)
D3DXSHADER_PACKMATRIX_COLUMNMAJOR = (1 shl 4)
D3DXSHADER_PARTIALPRECISION = (1 shl 5)
D3DXSHADER_FORCE_VS_SOFTWARE_NOOPT = (1 shl 6)
D3DXSHADER_FORCE_PS_SOFTWARE_NOOPT = (1 shl 7)
D3DXSHADER_NO_PRESHADER = (1 shl 8)
D3DXSHADER_AVOID_FLOW_CONTROL = (1 shl 9)
D3DXSHADER_PREFER_FLOW_CONTROL = (1 shl 10)
D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY = (1 shl 12)
D3DXSHADER_IEEE_STRICTNESS = (1 shl 13)
D3DXSHADER_USE_LEGACY_D3DX9_31_DLL = (1 shl 16)

D3DXSHADER_OPTIMIZATION_LEVEL0 = (1 shl 14)
D3DXSHADER_OPTIMIZATION_LEVEL1 = 0
D3DXSHADER_OPTIMIZATION_LEVEL2 = ((1 shl 14) or (1 shl 15))
D3DXSHADER_OPTIMIZATION_LEVEL3 = (1 shl 15)

D3DXFRAGMENT_LARGEADDRESSAWARE = (1 shl 17)
D3DXCONSTTABLE_LARGEADDRESSAWARE = (1 shl 17)

struct D3DXMACRO
       Name dq ?
       Definition dq ?
ends

struct D3DXSEMANTIC
       Usage dd ?
       UsageIndex dd ?
ends

struct D3DXFRAGMENT_DESC
       Name dq ?
       Target dd ?,?
ends

D3DXRS_BOOL = 0
D3DXRS_INT4 = 1
D3DXRS_FLOAT4 = 2
D3DXRS_SAMPLER = 3

D3DXPC_SCALAR = 0
D3DXPC_VECTOR = 1
D3DXPC_MATRIX_ROWS = 2
D3DXPC_MATRIX_COLUMNS = 3
D3DXPC_OBJECT = 4
D3DXPC_STRUCT = 5

D3DXPT_VOID = 0
D3DXPT_BOOL = 1
D3DXPT_INT = 2
D3DXPT_FLOAT = 3
D3DXPT_STRING = 4
D3DXPT_TEXTURE = 5
D3DXPT_TEXTURE1D = 6
D3DXPT_TEXTURE2D = 7
D3DXPT_TEXTURE3D = 8
D3DXPT_TEXTURECUBE = 9
D3DXPT_SAMPLER = 10
D3DXPT_SAMPLER1D = 11
D3DXPT_SAMPLER2D = 12
D3DXPT_SAMPLER3D = 13
D3DXPT_SAMPLERCUBE = 14
D3DXPT_PIXELSHADER = 15
D3DXPT_VERTEXSHADER = 16
D3DXPT_PIXELFRAGMENT = 17
D3DXPT_VERTEXFRAGMENT = 18
D3DXPT_UNSUPPORTED = 19

struct D3DXCONSTANTTABLEDESC
       Creator dq ?
       Version dd ?
       Constants dd ?
ends

struct D3DXCONSTANTDESC
       Name dq ?
       RegisterSet dd ?
       RegisterIndex dd ?
       RegisterCount dd ?
       Class dd ?
       Type dd ?
       Rows dd ?
       Columns dd ?
       Elements dd ?
       StructMembers dd ?
       Bytes dd ?
       DefaultValue dq ?
ends

;IID_ID3DXConstantTable GUID $ab3c758f,$93e,$4356,<$b7,$62,$4d,$b1,$8f,$1b,$3a,1>
interface ID3DXConstantTable,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetBufferPointer,\
	  GetBufferSize,\
	  GetDesc,\
	  GetConstantDesc,\
	  GetSamplerIndex,\
	  GetConstant,\
	  GetConstantByName,\
	  GetConstantElement,\
	  SetDefaults,\
	  SetValue,\
	  SetBool,\
	  SetBoolArray,\
	  SetInt,\
	  SetIntArray,\
	  SetFloat,\
	  SetFloatArray,\
	  SetVector,\
	  SetVectorArray,\
	  SetMatrix,\
	  SetMatrixArray,\
	  SetMatrixPointerArray,\
	  SetMatrixTranspose,\
	  SetMatrixTransposeArray,\
	  SetMatrixTransposePointerArray

;IID_ID3DXTextureShader GUID $3e3d67f8,$aa7a,$405d,<$a8,$57,$ba,1,$d4,$75,$84,$26>
interface ID3DXTextureShader,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetFunction,\
	  GetConstantBuffer,\
	  GetDesc,\
	  GetConstantDesc,\
	  GetConstant,\
	  GetConstantByName,\
	  GetConstantElement,\
	  SetDefaults,\
	  SetValue,\
	  SetBool,\
	  SetBoolArray,\
	  SetInt,\
	  SetIntArray,\
	  SetFloat,\
	  SetFloatArray,\
	  SetVector,\
	  SetVectorArray,\
	  SetMatrix,\
	  SetMatrixArray,\
	  SetMatrixPointerArray,\
	  SetMatrixTranspose,\
	  SetMatrixTransposeArray,\
	  SetMatrixTransposePointerArray

;IID_ID3DXFragmentLinker GUID $1a2c0cc2,$e5b6,$4ebc,<$9e,$8d,$39,$e,5,$78,$11,$b6>
interface ID3DXFragmentLinker,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetDevice,\
	  GetNumberOfFragments,\
	  GetFragmentHandleByIndex,\
	  GetFragmentHandleByName,\
	  GetFragmentDesc,\
	  AddFragments,\
	  GetAllFragments,\
	  GetFragment,\
	  LinkShader,\
	  LinkVertexShader,\
	  LinkPixelShader,\
	  ClearCache

D3DXINC_LOCAL = 0
D3DXINC_SYSTEM = 1

interface ID3DXInclude,\
	  Open,\
	  Close

struct D3DXSHADERCONSTANTTABLE
       Size dd ?
       Creator dd ?
       Version dd ?
       Constants dd ?
       ConstantInfo dd ?
       Flags dd ?
       Target dd ?
ends

struct D3DXSHADERCONSTANTINFO
       Name dd ?
       RegisterSet dw ?
       RegisterIndex dw ?
       RegisterCount dw ?
       Reserved dw ?
       TypeInfo dd ?
       DefaultValue dd ?
ends

struct D3DXSHADERTYPEINFO
       Class dw ?
       Type dw ?
       Rows dw ?
       Columns dw ?
       Elements dw ?
       StructMembers dw ?
       StructMemberInfo dd ?
ends

struct D3DXSHADERSTRUCTMEMBERINFO
       Name dd ?
       TypeInfo dd ?
ends

;Copyright (c) Microsoft Corporation.  All rights reserved.
;File:       d3dx9effect.h
;Content:    D3DX effect types and Shaders
D3DXFX_DONOTSAVESTATE = (1 shl 0)
D3DXFX_DONOTSAVESHADERSTATE = (1 shl 1)
D3DXFX_DONOTSAVESAMPLERSTATE = (1 shl 2)
D3DXFX_NOT_CLONEABLE = (1 shl 11)
D3DXFX_LARGEADDRESSAWARE = (1 shl 17)

D3DX_PARAMETER_SHARED = (1 shl 0)
D3DX_PARAMETER_LITERAL = (1 shl 1)
D3DX_PARAMETER_ANNOTATION = (1 shl 2)

struct D3DXEFFECTDESC
       Creator dq ?
       Parameters dd ?
       Techniques dd ?
       Functions dd ?,?
ends

struct D3DXPARAMETERDESC
       Name dq ?
       Semantic dq ?
       Class dd ?
       Type dd ?
       Rows dd ?
       Columns dd ?
       Elements dd ?
       Annotations dd ?
       StructMembers dd ?
       Flags dd ?
       Bytes dd ?,?
ends

struct D3DXTECHNIQUEDESC
       Name dq ?
       Passes dd ?
       Annotations dd ?
ends

struct D3DXPASSDESC
       Name dq ?
       Annotations dd ?,?
       pVertexShaderFunction dq ?
       pPixelShaderFunction dq ?
ends

struct D3DXFUNCTIONDESC
       Name dq ?
       Annotations dd ?,?
ends

;IID_ID3DXEffectPool GUID $9537ab04,$3250,$412e,<$82,$13,$fc,$d2,$f8,$67,$79,$33>
;No public methods
interface ID3DXEffectPool,\
	  QueryInterface,\
	  AddRef,\
	  Release

;IID_ID3DXBaseEffect GUID $17c18ac,$103f,$4417,<$8c,$51,$6b,$f6,$ef,$1e,$56,$be>
interface ID3DXBaseEffect,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetDesc,\
	  GetParameterDesc,\
	  GetTechniqueDesc,\
	  GetPassDesc,\
	  GetFunctionDesc,\
	  GetParameter,\
	  GetParameterByName,\
	  GetParameterBySemantic,\
	  GetParameterElement,\
	  GetTechnique,\
	  GetTechniqueByName,\
	  GetPass,\
	  GetPassByName,\
	  GetFunction,\
	  GetFunctionByName,\
	  GetAnnotation,\
	  GetAnnotationByName,\
	  SetValue,\
	  GetValue,\
	  SetBool,\
	  GetBool,\
	  SetBoolArray,\
	  GetBoolArray,\
	  SetInt,\
	  GetInt,\
	  SetIntArray,\
	  GetIntArray,\
	  SetFloat,\
	  GetFloat,\
	  SetFloatArray,\
	  GetFloatArray,\
	  SetVector,\
	  GetVector,\
	  SetVectorArray,\
	  GetVectorArray,\
	  SetMatrix,\
	  GetMatrix,\
	  SetMatrixArray,\
	  GetMatrixArray,\
	  SetMatrixPointerArray,\
	  GetMatrixPointerArray,\
	  SetMatrixTranspose,\
	  GetMatrixTranspose,\
	  SetMatrixTransposeArray,\
	  GetMatrixTransposeArray,\
	  SetMatrixTransposePointerArray,\
	  GetMatrixTransposePointerArray,\
	  SetString,\
	  GetString,\
	  SetTexture,\
	  GetTexture,\
	  GetPixelShader,\
	  GetVertexShader,\
	  SetArrayRange

;IID_ID3DXEffectStateManager GUID $79aab587,$6dbc,$4fa7,<$82,$de,$37,$fa,$17,$81,$c5,$ce>
interface ID3DXEffectStateManager,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  SetTransform,\
	  SetMaterial,\
	  SetLight,\
	  LightEnable,\
	  SetRenderState,\
	  SetTexture,\
	  SetTextureStageState,\
	  SetSamplerState,\
	  SetNPatchMode,\
	  SetFVF,\
	  SetVertexShader,\
	  SetVertexShaderConstantF,\
	  SetVertexShaderConstantI,\
	  SetVertexShaderConstantB,\
	  SetPixelShader,\
	  SetPixelShaderConstantF,\
	  SetPixelShaderConstantI,\
	  SetPixelShaderConstantB

;IID_ID3DXEffect GUID $f6ceb4b3,$4e4c,$40dd,<$b8,$83,$8d,$8d,$e5,$ea,$c,$d5>
interface ID3DXEffect,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetDesc,\
	  GetParameterDesc,\
	  GetTechniqueDesc,\
	  GetPassDesc,\
	  GetFunctionDesc,\
	  GetParameter,\
	  GetParameterByName,\
	  GetParameterBySemantic,\
	  GetParameterElement,\
	  GetTechnique,\
	  GetTechniqueByName,\
	  GetPass,\
	  GetPassByName,\
	  GetFunction,\
	  GetFunctionByName,\
	  GetAnnotation,\
	  GetAnnotationByName,\
	  SetValue,\
	  GetValue,\
	  SetBool,\
	  GetBool,\
	  SetBoolArray,\
	  GetBoolArray,\
	  SetInt,\
	  GetInt,\
	  SetIntArray,\
	  GetIntArray,\
	  SetFloat,\
	  GetFloat,\
	  SetFloatArray,\
	  GetFloatArray,\
	  SetVector,\
	  GetVector,\
	  SetVectorArray,\
	  GetVectorArray,\
	  SetMatrix,\
	  GetMatrix,\
	  SetMatrixArray,\
	  GetMatrixArray,\
	  SetMatrixPointerArray,\
	  GetMatrixPointerArray,\
	  SetMatrixTranspose,\
	  GetMatrixTranspose,\
	  SetMatrixTransposeArray,\
	  GetMatrixTransposeArray,\
	  SetMatrixTransposePointerArray,\
	  GetMatrixTransposePointerArray,\
	  SetString,\
	  GetString,\
	  SetTexture,\
	  GetTexture,\
	  GetPixelShader,\
	  GetVertexShader,\
	  SetArrayRange,\
	  GetPool,\
	  SetTechnique,\
	  GetCurrentTechnique,\
	  ValidateTechnique,\
	  FindNextValidTechnique,\
	  IsParameterUsed,\
	  Begin,\
	  BeginPass,\
	  CommitChanges,\
	  EndPass,\
	  End,\
	  GetDevice,\
	  OnLostDevice,\
	  OnResetDevice,\
	  SetStateManager,\
	  GetStateManager,\
	  BeginParameterBlock,\
	  EndParameterBlock,\
	  ApplyParameterBlock,\
	  DeleteParameterBlock,\
	  CloneEffect,\
	  SetRawValue

;IID_ID3DXEffectCompiler GUID $51b8a949,$1a31,$47e6,<$be,$a0,$4b,$30,$db,$53,$f1,$e0>
interface ID3DXEffectCompiler,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetDesc,\
	  GetParameterDesc,\
	  GetTechniqueDesc,\
	  GetPassDesc,\
	  GetFunctionDesc,\
	  GetParameter,\
	  GetParameterByName,\
	  GetParameterBySemantic,\
	  GetParameterElement,\
	  GetTechnique,\
	  GetTechniqueByName,\
	  GetPass,\
	  GetPassByName,\
	  GetFunction,\
	  GetFunctionByName,\
	  GetAnnotation,\
	  GetAnnotationByName,\
	  SetValue,\
	  GetValue,\
	  SetBool,\
	  GetBool,\
	  SetBoolArray,\
	  GetBoolArray,\
	  SetInt,\
	  GetInt,\
	  SetIntArray,\
	  GetIntArray,\
	  SetFloat,\
	  GetFloat,\
	  SetFloatArray,\
	  GetFloatArray,\
	  SetVector,\
	  GetVector,\
	  SetVectorArray,\
	  GetVectorArray,\
	  SetMatrix,\
	  GetMatrix,\
	  SetMatrixArray,\
	  GetMatrixArray,\
	  SetMatrixPointerArray,\
	  GetMatrixPointerArray,\
	  SetMatrixTranspose,\
	  GetMatrixTranspose,\
	  etMatrixTransposeArray,\
	  GetMatrixTransposeArray,\
	  SetMatrixTransposePointerArray,\
	  GetMatrixTransposePointerArray,\
	  SetString,\
	  GetString,\
	  SetTexture,\
	  GetTexture,\
	  GetPixelShader,\
	  GetVertexShader,\
	  SetArrayRange,\
	  SetLiteral,\
	  GetLiteral,\
	  CompileEffect,\
	  CompileShader

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx9tex.h
;Content:    D3DX texturing APIs
D3DX_FILTER_NONE = (1 shl 0)
D3DX_FILTER_POINT = (2 shl 0)
D3DX_FILTER_LINEAR = (3 shl 0)
D3DX_FILTER_TRIANGLE = (4 shl 0)
D3DX_FILTER_BOX = (5 shl 0)
D3DX_FILTER_MIRROR_U = (1 shl 16)
D3DX_FILTER_MIRROR_V = (2 shl 16)
D3DX_FILTER_MIRROR_W = (4 shl 16)
D3DX_FILTER_MIRROR = (7 shl 16)
D3DX_FILTER_DITHER = (1 shl 19)
D3DX_FILTER_DITHER_DIFFUSION = (2 shl 19)
D3DX_FILTER_SRGB_IN = (1 shl 21)
D3DX_FILTER_SRGB_OUT = (2 shl 21)
D3DX_FILTER_SRGB = (3 shl 21)

D3DX_SKIP_DDS_MIP_LEVELS_MASK = $1F
D3DX_SKIP_DDS_MIP_LEVELS_SHIFT = 26

D3DX_NORMALMAP_MIRROR_U = (1 shl 16)
D3DX_NORMALMAP_MIRROR_V = (2 shl 16)
D3DX_NORMALMAP_MIRROR = (3 shl 16)
D3DX_NORMALMAP_INVERTSIGN = (8 shl 16)
D3DX_NORMALMAP_COMPUTE_OCCLUSION = (16 shl 16)

D3DX_CHANNEL_RED = (1 shl 0)
D3DX_CHANNEL_BLUE = (1 shl 1)
D3DX_CHANNEL_GREEN = (1 shl 2)
D3DX_CHANNEL_ALPHA = (1 shl 3)
D3DX_CHANNEL_LUMINANCE = (1 shl 4)

D3DXIFF_BMP = 0
D3DXIFF_JPG = 1
D3DXIFF_TGA = 2
D3DXIFF_PNG = 3
D3DXIFF_DDS = 4
D3DXIFF_PPM = 5
D3DXIFF_DIB = 6
D3DXIFF_HDR = 7
D3DXIFF_PFM = 8

struct D3DXIMAGEINFO
       Width dd ?
       Height dd ?
       Depth dd ?
       MipLevels dd ?
       Format dd ?
       ResourceType dd ?
       ImageFileFormat dd ?
ends

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx9shapes.h
;Content:    D3DX simple shapes

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx9anim.h
;Content:    D3DX mesh types and functions

;IID_ID3DXAnimationSet GUID $698cfb3f,$9289,$4d95,<$9a,$57,$33,$a9,$4b,$5a,$65,$f9>
;IID_ID3DXKeyframedAnimationSet GUID $fa4e8e3a,$9786,$407d,<$8b,$4c,$59,$95,$89,$37,$64,$af>
;IID_ID3DXCompressedAnimationSet GUID $6cc2480d,$3808,$4739,<$9f,$88,$de,$49,$fa,$cd,$8d,$4c>
;IID_ID3DXAnimationController GUID $ac8948ec,$f86d,$43e2,<$96,$de,$31,$fc,$35,$f9,$6d,9e>

D3DXMESHTYPE_MESH = 1
D3DXMESHTYPE_PMESH = 2
D3DXMESHTYPE_PATCHMESH = 3

struct D3DXMESHDATA
       Type dd ?,?
       union
	   pMesh dq ?
	   pPMesh dq ?
	   pPatchMesh dq ?
       ends
ends

struct D3DXMESHCONTAINER
       Name dq ?
       MeshData D3DXMESHDATA
       pMaterials dq ?
       pEffects dq ?
       NumMaterials dd ?,?
       pAdjacency dq ?
       pSkinInfo dq ?
       pNextMeshContainer dq ?
ends

struct D3DXFRAME
       Name dq ?
       TransformationMatrix D3DXMATRIX
       pMeshContainer dq ?
       pFrameSibling dq ?
       pFrameFirstChild dq ?
ends

interface ID3DXAllocateHierarchy,\
	  CreateFrame,\
	  CreateMeshContainer,\
	  DestroyFrame,\
	  DestroyMeshContainer

interface ID3DXLoadUserData,\
	  LoadTopLevelData,\
	  LoadFrameChildData,\
	  LoadMeshChildData

interface ID3DXSaveUserData,\
	  AddFrameChildData,\
	  AddMeshChildData,\
	  AddTopLevelDataObjectsPre,\
	  AddTopLevelDataObjectsPost,\
	  RegisterTemplates,\
	  SaveTemplates

D3DXCALLBACK_SEARCH_EXCLUDING_INITIAL_POSITION = 1
D3DXCALLBACK_SEARCH_BEHIND_INITIAL_POSITION = 2

interface ID3DXAnimationSet,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetName,\
	  GetPeriod,\
	  GetPeriodicPosition,\
	  GetNumAnimations,\
	  GetAnimationNameByIndex,\
	  GetAnimationIndexByName,\
	  GetSRT,\
	  GetCallback

D3DXPLAY_LOOP = 0
D3DXPLAY_ONCE = 1
D3DXPLAY_PINGPONG = 2

struct D3DXKEYVECTOR3
       Time dd ?
       Value D3DXVECTOR3
ends

struct D3DXKEYQUATERNION
       Time dd ?
       Value D3DXQUATERNION
ends

struct D3DXKEYCALLBACK
       Time dd ?,?
       pCallbackData dq ?
ends

D3DXCOMPRESS_DEFAULT = 0

interface ID3DXKeyframedAnimationSet,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetName,\
	  GetPeriod,\
	  GetPeriodicPosition,\
	  GetNumAnimations,\
	  GetAnimationNameByIndex,\
	  GetAnimationIndexByName,\
	  GetSRT,\
	  GetCallback,\
	  GetPlaybackType,\
	  GetSourceTicksPerSecond,\
	  GetNumScaleKeys,\
	  GetScaleKeys,\
	  GetScaleKey,\
	  SetScaleKey,\
	  GetNumRotationKeys,\
	  GetRotationKeys,\
	  GetRotationKey,\
	  SetRotationKey,\
	  GetNumTranslationKeys,\
	  GetTranslationKeys,\
	  GetTranslationKey,\
	  SetTranslationKey,\
	  GetNumCallbackKeys,\
	  GetCallbackKeys,\
	  GetCallbackKey,\
	  SetCallbackKey,\
	  UnregisterScaleKey,\
	  UnregisterRotationKey,\
	  UnregisterTranslationKey,\
	  RegisterAnimationSRTKeys,\
	  Compress,\
	  UnregisterAnimation

interface ID3DXCompressedAnimationSet,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetName,\
	  GetPeriod,\
	  GetPeriodicPosition,\
	  GetNumAnimations,\
	  GetAnimationNameByIndex,\
	  GetAnimationIndexByName,\
	  GetSRT,\
	  GetCallback,\
	  GetPlaybackType,\
	  GetSourceTicksPerSecond,\
	  etCompressedData,\
	  GetNumCallbackKeys,\
	  GetCallbackKeys

D3DXPRIORITY_LOW = 0
D3DXPRIORITY_HIGH = 1

struct D3DXTRACKDESC
       Priority dd ?
       Weight dd ?
       Speed dd ?,?
       Position dq ?
       Enable dd ?,?
ends

D3DXEVENT_TRACKSPEED = 0
D3DXEVENT_TRACKWEIGHT = 1
D3DXEVENT_TRACKPOSITION = 2
D3DXEVENT_TRACKENABLE = 3
D3DXEVENT_PRIORITYBLEND = 4

D3DXTRANSITION_LINEAR = 0
D3DXTRANSITION_EASEINEASEOUT = 1

struct D3DXEVENTDESC
       Type dd ?
       Track dd ?
       StartTime dq ?
       Duration dq ?
       Transition dd ?,?
       union
	   Weight dd ?
	   Speed dd ?
	   Position dq ?
	   Enable dd ?
       ends
ends

interface ID3DXAnimationCallbackHandler,\
	  HandleCallback

interface ID3DXAnimationController,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetMaxNumAnimationOutputs,\
	  GetMaxNumAnimationSets,\
	  GetMaxNumTracks,\
	  GetMaxNumEvents,\
	  RegisterAnimationOutput,\
	  RegisterAnimationSet,\
	  UnregisterAnimationSet,\
	  GetNumAnimationSets,\
	  GetAnimationSet,\
	  GetAnimationSetByName,\
	  AdvanceTime,\
	  ResetTime,\
	  GetTime,\
	  SetTrackAnimationSet,\
	  GetTrackAnimationSet,\
	  SetTrackPriority,\
	  SetTrackSpeed,\
	  SetTrackWeight,\
	  SetTrackPosition,\
	  SetTrackEnable,\
	  SetTrackDesc,\
	  GetTrackDesc,\
	  SetPriorityBlend,\
	  GetPriorityBlend,\
	  KeyTrackSpeed,\
	  KeyTrackWeight,\
	  KeyTrackPosition,\
	  KeyTrackEnable,\
	  KeyPriorityBlend,\
	  UnkeyEvent,\
	  UnkeyAllTrackEvents,\
	  UnkeyAllPriorityBlends,\
	  GetCurrentTrackEvent,\
	  GetCurrentPriorityBlend,\
	  GetUpcomingTrackEvent,\
	  GetUpcomingPriorityBlend,\
	  ValidateEvent,\
	  GetEventDesc,\
	  CloneAnimationController

D3DXERR_CANNOTMODIFYINDEXBUFFER = $88760B54
D3DXERR_INVALIDMESH = $88760B55
D3DXERR_CANNOTATTRSORT = $88760B56
D3DXERR_SKINNINGNOTSUPPORTED = $88760B57
D3DXERR_TOOMANYINFLUENCES = $88760B58
D3DXERR_INVALIDDATA = $88760B59
D3DXERR_LOADEDMESHASNODATA = $88760B5A
D3DXERR_DUPLICATENAMEDFRAGMENT = $88760B5B
